home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 October A / Pcwk10a98.iso / Lotus / LOTUS / SMASTERS / APPROACH / SCHEDULE.MPR / SCRIPT / ApproachDoc / Schedule Display / Body / btnReserve.s (.txt) < prev    next >
Encoding:
Null Bytes Alternating  |  1997-01-09  |  3.0 KB  |  40 lines

  1. '++LotusScript Development Environment:2:5:(Options):0:66
  2.  
  3. '++LotusScript Development Environment:2:5:(Forward):0:1
  4. Declare Sub Click(Source As Button, X As Long, Y As Long, Flags As Long)
  5.  
  6. '++LotusScript Development Environment:2:5:(Declarations):0:2
  7.  
  8. '++LotusScript Development Environment:2:2:BindEvents:1:129
  9. Private Sub BindEvents(Byval Objectname_ As String)
  10.     Static Source As BUTTON
  11.     Set Source = Bind(Objectname_)
  12.     On Event Click From Source Call Click
  13. End Sub
  14.  
  15. '++LotusScript Development Environment:2:2:Click:1:12
  16. Sub Click(Source As Button, X As Long, Y As Long, Flags As Long)
  17. ' Click event for the btnReserve button object in the Schedule Display view
  18. ' This script opens the Reservation view with no pre-selected time or room,
  19. ' using the date for the schedule currently displayed.
  20.     
  21.     Dim btn As button        ' shortened reference for a button on the Reservation view
  22.     
  23.     ' Assign a shorter name to reference a button on the Reservation view.
  24.     Set btn = currentdocument.reservation.body.btnDone
  25.     
  26.     ' Set the text of the button to "Reserve" to indicate the action that occurs
  27.     ' when the dialog box closes.
  28.     btn.text = "Reserve"
  29.     
  30.     ' Set the reservation information to the date currently displayed, and blank
  31.     ' start time, end time, and room name.
  32.     GlobDateDisplay = source.fbxDateDisplay.text
  33.     GlobStartTime = ""
  34.     GlobEndTime = ""
  35.     GlobRoom = ""
  36.     
  37.     ' Switch to the Reservation view.
  38.     Set currentwindow.activeview = currentdocument.reservation
  39.     
  40. End Sub        ' Click event for btnReserve on Schedule Display view